<h1><%= title "Duchies" %></h1>

<table>
  <tr>
    <th>Name</th>
    <th>Kingdom</th>
	<th>Ruler</th>
  </tr>

<% for duchy in @duchies %>
  <tr>
    <td><%=h duchy.name %></td>
    <td><%=link_to_record duchy.kingdom %></td>
	<td><%=link_to_record Title.duke_of duchy %></td>
    <td><%= link_to 'Show', duchy %></td>
    <td><%= link_to 'Edit', edit_duchy_path(duchy) %></td>
    <td><%= link_to 'Destroy', duchy, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New duchy', new_duchy_path %> | <%= link_to 'Home', '/' %>
